package com.atXiao.food.template;

import java.util.Optional;

/**
 * @author: lixiaoxiao
 * @date: 2024/1/10 11:38
 * @version: 1.0
 * @desc:
 */

public class BeverageTemplateExample {
    public static void main(String[] args) {

        Optional<Object> demoObj = Optional.ofNullable(null);
        if (demoObj.isPresent()) {
            System.out.println("不为空");
        } else {
            System.out.println("测试的值为空");
        }


        CoffeeBeverage coffeeBeverage = new CoffeeBeverage();
        System.out.println("制作咖啡-------------");
        coffeeBeverage.makeBeverage();

        System.out.println("=====================================");

        TeaBeverage teaBeverage = new TeaBeverage();
        System.out.println("制作毛尖茶-----------");
        teaBeverage.makeBeverage();


    }
}
